//搜索的对象
export const grammarSearchEntity = {
    //子课程ID
    courseId:null,
    //父课程ID,courseParentId=0
    parentCourseId:"ALL",
    //语法
    grammarContent:"",
    //语法解释
    grammarExplain:"",
    //当前页
    currentPage:1,
    //每页大小
    pageSize:10
}

//新增或修改的对象
export const grammarEntity = {
    //子课程ID
    courseId:null,
    //父课程ID,courseParentId=0
    courseParentId:null,
    //语法
    grammarContent:"",
    //语法解释
    grammarExplain:"",
    //语法例子(最终要提交给后端的数据)
    grammarExamples:[{
        //录音文件ID
        fileId:null,
        //日语语法
        contentR:'',
        //中文解释
        contentZ:'',
        //录音是否存在标记
        recorderExist:false
    }],
}

//新增或修改的校验对象
export const grammarEntityRles = {
    courseParentId:[
        {
            message:"课程不能为空",
            required: true,
            trigger:"blur"
        }
    ],
    courseId:[
        {
            message:"课程不能为空",
            required: true,
            trigger:"blur"
        }
    ],
    grammarContent:[
        {
            message:"语法不能为空",
            required: true,
            trigger:"blur"
        }
    ],
    grammarExplain:[
        {
            message:"语法解释不能为空",
            required: true,
            trigger:"blur"
        }
    ]
}

//语法数据渲染对象
export const dataTitle = [
    { title: "课程类型",name:"courseParentName",width:"150" },
    { title: "课程",name:"courseName",width:"80" },
    { title: "语法",name:"grammarContent",width:"430" },
    { title: "语法解释",name:"grammarExplain",width:"720" },
    { title: "创建时间",name:"createTime",width:"160" },
    { title: "更新时间",name:"updateTime",width:"160" }
];
